package org.admanager.simplifiedsca.plugin.diagram.edit.policies;

import org.admanager.simplifiedsca.plugin.diagram.edit.commands.ComponentCreateCommand;
import org.admanager.simplifiedsca.plugin.diagram.edit.commands.ReferenceCreateCommand;
import org.admanager.simplifiedsca.plugin.diagram.edit.commands.ServiceCreateCommand;
import org.admanager.simplifiedsca.plugin.diagram.providers.SOADManagementMetamodelElementTypes;
import org.eclipse.gef.commands.Command;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;

/**
 * @generated
 */
public class CompositeCompositeCompartmentItemSemanticEditPolicy extends
		SOADManagementMetamodelBaseItemSemanticEditPolicy {

	/**
	 * @generated
	 */
	public CompositeCompositeCompartmentItemSemanticEditPolicy() {
		super(SOADManagementMetamodelElementTypes.Composite_2002);
	}

	/**
	 * @generated
	 */
	protected Command getCreateCommand(CreateElementRequest req) {
		if (SOADManagementMetamodelElementTypes.Component_3006 == req
				.getElementType()) {
			return getGEFWrapper(new ComponentCreateCommand(req));
		}
		if (SOADManagementMetamodelElementTypes.Reference_3009 == req
				.getElementType()) {
			return getGEFWrapper(new ReferenceCreateCommand(req));
		}
		if (SOADManagementMetamodelElementTypes.Service_3010 == req
				.getElementType()) {
			return getGEFWrapper(new ServiceCreateCommand(req));
		}
		return super.getCreateCommand(req);
	}

}
